home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / asmutil / a86v400.zip / A13.DOC < prev    next >
Text File  |  1994-12-21  |  18KB  |  365 lines

  1. CHAPTER 13   ASSOCIATED TOOLS AND OUTPUT FILES
  2.  
  3.  
  4. Listings with A86
  5.  
  6. A86 has a powerful listing facility, that allows you to tailor
  7. the format of your listings to your specific needs.  Because the
  8. listing pass adds a significant percentage to the time it takes
  9. A86 to execute, the listing is not produced by default.  You must
  10. include either a +L switch, or the name of a file with a .LST
  11. extension on the A86 invocation line.
  12.  
  13. By default (+L but nothing else specified), an A86 listing file
  14. consists of a sequence of pages, each 59 lines long and 79
  15. characters wide.  Each page has a header line identifying A86 and
  16. its version number, giving the name of the program output file,
  17. the date and time of assembly, the name of the source file
  18. currently being listed, and a page number.  Note that I am not so
  19. obnoxious as to splash my company name over the top of every page
  20. of your listing!  If both a TITLE and a SUBTTL have been
  21. specified, the header consists of three content lines and one
  22. skipped line; otherwise, there are just two content lines.  Each
  23. listing line has a sequential line number, a hex offset and hex
  24. object bytes, an indicator field with "i" for include files and
  25. "m" for macro expansions, and the source code itself.  Nested
  26. includes have no special indication; nested macros are indicated
  27. by increasing indentation of the macro expansion line.  A86 tries
  28. to be intelligent about the formatting of its listings: it will
  29. break up the wraparound of a long line at a word if reasonable.
  30. It will avoid breaking up a multi-line listing of less than 10
  31. lines.  It will break pages at sensible locations (described in
  32. detail shortly, under the PAGE directive).  It will suppress
  33. blank lines at the top and bottom of pages (but it counts them in
  34. the sequential line numbering so you can tell they were there).
  35.  
  36. Five A86 switches, H, I, L, T, and W, allow you to control the
  37. existence and characteristics of titling, pagination, page-number
  38. format, page break control, source line numbering, hex object
  39. display, and source line display.  The operation of these
  40. switches is described in detail in Chapter 3.  Here are some
  41. examples of switch settings that will produce listings meeting
  42. some specialized needs:
  43.  
  44. +L21+T0+W12+I137 produces a listing consisting only of the source
  45. code, with the hex offset of each line placed to the left, and
  46. with the line truncated at 79 columns.  Such a listing file would
  47. be ideal for viewing the source file while debugging on a
  48. primitive remote system that cannot run D86.
  49.  
  50. +L9+T0+W4+I128 produces a list file of just source code, with all
  51. conditional-assembly lines and skipped code removed.  All
  52. titling, pagination, line numbers, and hex codes are eliminated,
  53. so the list file could be renamed as a source file, and
  54. reassembled.  This might be useful for archival purposes, or for
  55. giving individualized versions of a source file to parties who
  56. don't need any of the conditional-assembly options you've
  57. programmed.
  58.                                                              13-2
  59.  
  60. +L+I186+H15+W12 produces a list file that concentrates on the hex
  61. output, increasing the width to 16 bytes per line, showing up to
  62. 15 hex runover lines, and limiting the amount of source code
  63. shown.
  64.  
  65.  
  66. Listing Control Directives
  67.  
  68. In addition to the five switches just mentioned, A86 has a number
  69. of source-code directives that control aspects of listings.
  70.  
  71. The .NOLIST directive causes all subsequent listing to be
  72. suppressed, until a .LIST directive is seen.  Line numbering and
  73. page numbering continues during list suppression, so the result
  74. is as if you had text-edited the listing file to remove all the
  75. suppressed lines.
  76.  
  77. I also offer a macro-definition control code, #H, which causes
  78. the suppression of the listing of macro expansion lines.  If #H
  79. appears anywhere within a macro definition, all calls to that
  80. macro will be listed as the macro call line only, showing the
  81. generated hex object bytes on that call line.  This allows you to
  82. define macros that will be listed as if they were simple machine
  83. instructions.  This effect can be achieved for all macros with an
  84. L switch setting that doesn't include the value 4 (see Chapter
  85. 3).
  86.  
  87. The TITLE directive specifies a title that will appear at the top
  88. of every page of the entire assembly.  The title consists of the
  89. first 60 characters starting with the first nonblank after the
  90. word TITLE on the line.  If you give more than one TITLE
  91. directive in a program, only the first will be recognized.
  92.  
  93. The SUBTTL directive specifies a subtitle to appear at the top of
  94. every page until another SUBTTL directive is given (or until the
  95. next file change if you have the +T16 switch-bit value set).  If
  96. the directive is at the very top of the listing page, or it is
  97. shortly after an automatic page break, the subtitle will take
  98. effect on the page in which it appears.  Otherwise, it will take
  99. effect at the next page.
  100.  
  101. The PAGE directive serves several purposes.  The word PAGE by
  102. itself will force a new page in the listing, at that point.  A
  103. plus sign following the word PAGE causes a new page plus an
  104. incremented section number -- e.g. PAGE + on page 1-17 will cause
  105. a new page 2-1 to begin.  The word PAGE followed by one or more
  106. constant parameters will set various A86 listing variables to the
  107. specified parameter values.  The variables are as follows:
  108.  
  109. 1. The length, in lines, of a listing page.  Minimum is 10;
  110.    maximum is 65535.
  111.  
  112. 2. The width, in characters, of the maximum listing line.
  113.  
  114. 3,4,5,6. The number of lines at the end of a page, less than
  115.    which A86 guarantees will not be "widowed" after a page break
  116.    of level 1,2,3,4, respectively.
  117.                                                              13-3
  118.  
  119. Omitted parameters (either left off the end or via leading commas
  120. or 2 consecutive commas) will remain unchanged.
  121.  
  122. The concept of "page break levels" is unique to A86 listings: it
  123. is my attempt to get A86 to make intelligent decisions about
  124. where to issue new listing pages.  There are 4 page break levels,
  125. normally triggered by gaps (consecutive blank lines) in the
  126. source code, and by source-file changes.  One- and two-line gaps
  127. cause breaks of level 1 and 2, respectively.  Three-or-more-line
  128. gaps cause a break of level 3.  A source-file change causes a
  129. break of level 4.  If a page break occurs close to the end of a
  130. page, and a break of greater level hasn't already been marked,
  131. A86 will mark the point for a potential new page.  If a page
  132. break of equal or greater level doesn't occur before the page is
  133. full, A86 will issue a new page at the marked point.  The
  134. definition of "close to the end of the page" is 10,20,30, and 40
  135. lines, respectively, for break levels 1,2,3,4.  Those line counts
  136. can be changed by parmeters 3,4,5,6 of the PAGE directive, as
  137. already described.
  138.  
  139. If you are intimidated by all this, or if you want to control
  140. page break levels manually, you may specify a T switch value that
  141. does not include the "auto-paging" option value 4.  With that
  142. option disabled, page break levels will occur only at places
  143. where you issue a PAGE directive containing a special parameter
  144. value /1, /2, /3, or /4.  The leading slash indicates that a page
  145. break of the indicated level is desired here.  Such a parameter
  146. will typically be given by itself following PAGE; but, if you
  147. wish, it can be interspersed anywhere among other parameter
  148. values -- it will not be "counted" for the purposes of
  149. determining the other parameters' positions.
  150.  
  151.  
  152.  
  153. Cross-reference Facility
  154.  
  155.  
  156. When you specify the +X switch, A86 will create a
  157. cross-referenced symbol table listing of your program.
  158.  
  159. The output file, having a standard extension of .XRF is an
  160. alphabetical listing of all the non-local symbols in your
  161. program.  For each symbol, A86 gives its type, the file in which
  162. it was defined, its value, and a list of all procedures in which
  163. the file was used.  If you print this file, you typically use the
  164. TCOLS tool to obtain a multi-column listing from A86's
  165. single-column output.
  166.  
  167. Note the use of procedure names to identif